{if count($toc)}
<h2 align="center" class="toc">Table of Contents</h2>
<ul class="menu">
{section name=toc loop=$toc}
{if $toc[toc].tagname == 'refsect1'}
{assign var="context" value="refsect1"}
<li class="docs doc-tree">{$toc[toc].link}</li>
{/if}
{if $toc[toc].tagname == 'refsect2'}
{assign var="context" value="refsect2"}
<li class="docs doc-tree" style="padding-left: 15px;">{$toc[toc].link}</li>
{/if}
{if $toc[toc].tagname == 'refsect3'}
{assign var="context" value="refsect3"}
<li class="docs doc-tree" style="padding-left: 30px;">{$toc[toc].link}</li>
{/if}
{if $toc[toc].tagname == 'table'}
{if $context == 'refsect2'}&nbsp;&nbsp;&nbsp;{/if}
{if $context == 'refsect3'}&nbsp;&nbsp;&nbsp;{/if}
Table: {$toc[toc].link}
{/if}
{if $toc[toc].tagname == 'example'}
{if $context == 'refsect2'}&nbsp;&nbsp;&nbsp;{/if}
{if $context == 'refsect3'}&nbsp;&nbsp;&nbsp;{/if}
Table: {$toc[toc].link}
{/if}
{/section}
</ul>
{/if}